package simple_bbs.model;

import act.db.morphia.MorphiaModel;
import org.mongodb.morphia.annotations.Entity;
import org.osgl.aaa.Principal;
import org.osgl.util.S;

@Entity("audit")
public class Audit extends MorphiaModel<Audit> {
    public String message;
    public String target;
    public String principal;
    public boolean success;
    public String permission;

    public Audit(Object target, Principal principal, String permission, boolean success, String message) {
        this.message = message;
        this.target = S.string(target);
        this.principal = principal.getName();
        this.permission = permission;
        this.success = success;
    }

}
